<!DOCTYPE html>
<html lang="en">
#parse('base/head.html')
<body class="no-skin">
<div class="indexHeader">
    #parse('base/top_head.html')
    #parse('base/menu.html')
</div>
<div class="main-container ace-save-state" id="main-container">
    <div class="fp-framework main-content">
        <div class="main-content-inner">
            <div class="page-content">
                <div class="row">
                    <div class="col-sm-2" id="left-gov-tree">
                        <div  class="sidebar responsive ace-save-state">
                            <ul class="fp-framework nav nav-list townUl">
                                
                                <li class="townTreeNode" parentValue="basicData">
                                    <a href="#" class="dropdown-toggle">
                                        <i class="menu-icon fa fa-list"></i>
                                        <span class="menu-text"> 基础数据 </span>
                                        <b class="arrow fa fa-angle-down"></b>
                                    </a>
                                    <b class="arrow"></b>
                                    <ul class="submenu">
                                        
										<li class="villTreeNode fp-active" childrenValue="familyIndex">
                                            <a href="javacript:void(0);">
                                                <i class="menu-icon fa fa-caret-right"></i>
                                               贫困户基本信息
                                            </a>
                                            <b class="arrow"></b>
                                        </li>
										
                                    </ul>
									
									<ul class="submenu">
                                        
										<li class="villTreeNode " childrenValue="projectIndex">
                                            <a href="javacript:void(0);">
                                                <i class="menu-icon fa fa-caret-right"></i>
                                               项目基本信息
                                            </a>
                                            <b class="arrow"></b>
                                        </li>
										
                                    </ul>
									
									<ul class="submenu">
                                        
										<li class="villTreeNode " childrenValue="aidReportChannelIndex">
                                            <a href="javacript:void(0);">
                                                <i class="menu-icon fa fa-caret-right"></i>
                                               引用单位基本信息
                                            </a>
                                            <b class="arrow"></b>
                                        </li>
										
                                    </ul>
                                </li>
                                
								<!-- 
								<li class="townTreeNode" parentValue="ruleManage">
                                    <a href="#" class="dropdown-toggle">
                                        <i class="menu-icon fa fa-list"></i>
                                        <span class="menu-text"> 角色管理 </span>
                                        <b class="arrow fa fa-angle-down"></b>
                                    </a>
                                    <b class="arrow"></b>
                                    <ul class="submenu">
                                        
                                        <li class="villTreeNode" childrenValue="villageIndex">
                                            <a href="javacript:void(0);">
                                                <i class="menu-icon fa fa-caret-right"></i>
                                               行政村基本信息
                                            </a>
                                            <b class="arrow"></b>
                                        </li>
                                        
										<li class="villTreeNode" childrenValue="familyIndex">
                                            <a href="javacript:void(0);">
                                                <i class="menu-icon fa fa-caret-right"></i>
                                               贫困户基本信息
                                            </a>
                                            <b class="arrow"></b>
                                        </li>
										
										<li class="villTreeNode" childrenValue="familyMemberIndex">
                                            <a href="javacript:void(0);">
                                                <i class="menu-icon fa fa-caret-right"></i>
                                               贫困户家庭成员信息
                                            </a>
                                            <b class="arrow"></b>
                                        </li>
										
										<li class="villTreeNode" childrenValue="aidTeamIndex">
                                            <a href="javacript:void(0);">
                                                <i class="menu-icon fa fa-caret-right"></i>
                                               帮扶工作队基本信息
                                            </a>
                                            <b class="arrow"></b>
                                        </li>
                                    </ul>
                                </li>
								 -->
                            </ul><!-- /.nav-list -->
                        </div>
                    </div>
                    <div class="col-sm-10">
                        <iframe onload="setTimeout(function(){setheight()},1000);"  id="contentFrame" frameborder=”no” border=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no”   style="border:0px;width:100%;"  frameborder="0" ></iframe>
                    </div>
                </div>
            </div><!-- /.page-content -->
        </div>
    </div>
</div>
#parse("base/footer.html")

<script type="text/javascript">
	function setIframeHeight(iframe) {
		if (iframe) {
			var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
			if (iframeWin.document.getElementsByTagName("body")[0]) {
				iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
			}
		}
	};

    function setheight(){
//        setIframeHeight(document.getElementById('contentFrame'));
        var BodyHeight=document.documentElement.clientHeight;
        BodyHeight -= 130;
        $("#contentFrame").css({
            "height" : BodyHeight +"px"
        });
    }
	
	window.onload = function () {
		setIframeHeight(document.getElementById('contentFrame'));
	};
    jQuery(function ($) {
		//父级菜单
        $(".townTreeNode").on('click',function () {
            var me = this;
            var isOpen = this.classList.contains('open');
            console.log("townTreeNode");
            if(isOpen){
            	console.log("townTreeNode isOpen");
            	$(me).children("li:eq(0)").addClass("fp-active");
            }else {
                var townId = $(this).attr('parentValue');
                $(".villTreeNode").removeClass("fp-active");
            }
            
        })
        // 子级菜单点击事件
        $(".villTreeNode").on('click',function (event) {
        	event.stopPropagation(); 
        	console.log("villTreeNode");
        	var me = this;
        	var parentPath = $(me).parents(".townTreeNode").attr('parentValue');
        	console.log($(me).parents(".townTreeNode"));
            var subPath = $(me).attr('childrenValue');
            $(".villTreeNode").removeClass("fp-active");
            $(me).addClass('fp-active');
            //console.info('村节点点击')
            $("#contentFrame")[0].src = "$!webPath/"+parentPath+"/" + subPath
        })
        $(".townUl li:eq(0)").addClass('open');
        //$(".villTreeNode [childrenValue=familyIndex]").addClass('fp-active');
        $("#contentFrame")[0].src = "$!webPath/basicData/familyIndex";
    // 显示项目详情
    })
</script>

<script>
    jQuery(function ($) {
        menuActive(6)
    })
</script>
</body>
</html>

